package com.itheima.service.impl;

import com.github.pagehelper.PageHelper;
import com.itheima.dao.OrdersDao;
import com.itheima.domain.Orders;
import com.itheima.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrdersServiceImpl implements OrdersService {
    @Autowired
    private OrdersDao ordersDao;
    public List<Orders> findAllOrders(int page, int pageSize){
        PageHelper.startPage(page,pageSize);
      return ordersDao.findAllOrders();
    }

    @Override
    public Orders findById(String id) {

        return ordersDao.findById(id);
    }

    ;


}
